import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int t=sc.nextInt();
        for(int i=0;i<t;i++){
            int x=sc.nextInt();
            int y=sc.nextInt();
            int countx=x/5+((x%5==0)?0:1);
            int county=y/5+((y%5==0)?0:1);
            System.out.println(countx+county);
            System.gc();
        }
    }
}